package com.internetCafes.spms.web.sys.mapper;
import com.internetCafes.spms.core.annotation.NoTentant;
import com.internetCafes.spms.core.generic.GenericDao;
import com.internetCafes.spms.web.sys.model.EducationArticleInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author LinYe
 * @date 2020/10/29
 */
@Mapper
public interface EducationArticleInfoMapper extends GenericDao<EducationArticleInfo, Long> {
    /**
     * 插入
     */
    int insert(EducationArticleInfo educationArticleInfo);

    /**
     * 批量插入
     */
    int insertBatch(EducationArticleInfo educationArticleInfo);


    /**
     * 按主键ID查询
     */
    @NoTentant
    EducationArticleInfo selectByPrimaryKey(Long id);


    /**
     * 按主键ID更新
     */
    int updateByPrimaryKey(EducationArticleInfo educationArticleInfo);

    /**
     * 按参数查询
     */
    @NoTentant
    List<EducationArticleInfo> selectByParams(Map<String, Object> params);

    /**
     * 按参数查询数量
     */
    @NoTentant
    long countByParams(Map<String, Object> params);

    /**
     * 按主键ID删除
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 按主键ID批量删除
     */
    int deleteBatchByPrimaryKey(List<Long> ids);
}
